package cc.rengu.redp.system.service.impl;

import cc.rengu.redp.system.dao.CommonOrganizationMapper;
import cc.rengu.redp.system.domain.Organization;
import cc.rengu.redp.system.service.CommonOrganizationService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

@Service
public class CommonOrganizationServiceImpl extends ServiceImpl<CommonOrganizationMapper, Organization> implements CommonOrganizationService {

    @Override
    public Organization getOrgByOrgCode(String orgCode) {
        LambdaQueryWrapper<Organization> lqw = new LambdaQueryWrapper<>();
        lqw.eq(Organization::getOrgCode, orgCode);
        return this.baseMapper.selectOne(lqw);
    }
}
